Electro-optical code readers are known to the prior for scanning a coded record and for providing an electrical output signal representative of encoded data contained in the record. Each character of the encoded data (e.g., an alpha-numeric character) is represented by a predetermined number of sequential binary bits. One form of code typically used is the bar code which comprises a sequential series of alternating bars and spaces printed on a surface. In one type of bar code, each bit is represented by a single bar or space, with the width of each bar and space denoting the binary value of its corresponding bit.
The reader may comprise a hand-held housing, containing a light source and a light detector, which is manually scanned across the coded record. Examples of such readers are seen in U.S. Pat. No. 3,784,794 issued Oct. 10, 1972, Allais and U.S. Pat. No. 3,892,974 issued July 1, 1975, Ellefson et al., both assigned to the assignee of the present invention. As the reader is scanned across the coded record, it provides an electrical output signal which has a voltage level dependent upon the amount of light reflected by the particular portion of the coded record being scanned. Therefore, a space will result in a first or "positive" voltage level of the electrical output signal, while a bar will result in a second or "negative" voltage level of the electrical output signal, with the two voltage levels being interconnected by relatively fast voltage transitions at the approximate location of the transitions from a bar to a space, and vice versa. Essentially, the electrical output signal appears as an irregular sine wave alternating between first and second, peak voltage levels.
In order to decode the encoded data, it is necessary to supply the electrical output signal from the reader to a digital code recognition apparatus. The electrical output signal must, however, first be shaped into a square wave having predetermined first and second logic levels for each space and bar, with the transitions between such predetermined logic levels corresponding in time as nearly as possible to the transitions in time between bars and spaces in the coded record as the coded record is scanned so that the binary values of the bits in the encoded data are not lost or distorted.
It is particularly difficult to accurately detect the transitions between bars and spaces in the electrical output signal, inasmuch as the peak voltage levels in the electrical output signal and the slope of the transitions between such peak voltage levels may vary as the coded record is scanned, depending upon a number of factors, including the level of ambient light, the angle at which the reader is held with respect to the coded record during scanning, and errors in printing of the coded record, or dirt on the coded record, which result in the change in the "whiteness" of the spaces or a change in the "darkness" of the bars.
In the past, such wave shaping has been accomplished by comparing the instantaneous voltage level of an input signal proportional to the electrical output signal with a predetermined reference voltage. As long as the voltage level of the input signal is above the predetermined reference voltage, the wave shaping circuit provides an output signal having a first logic level, and, as long as the voltage level of the input signal is below the predetermined reference voltage, the wave shaping circuit provides an output signal having a second, distinct logic level. If the value of the reference voltage is fixed, then the wave shaping circuit may not respond to certain bars and spaces in the coded record which result in peak voltage levels of the input signal not sufficiently great with respect to the reference voltage so as to provide a change in the logic level of the output from the wave shaping circuit. To overcome this problem of variation in peak voltage levels and to accordingly provide a wave shaping circuit which is relatively amplitude-insensitive. U.S. Pat. No. 3,909,594, issued Sept. 30, 1975, Allais et al. and assigned to the assignee of the present invention, teaches a circuit for establishing a variable reference voltage whose level "tracks" the peak voltage levels in the input signal so as to be always approximately midway between the last positive and negative excursions thereof.
The circuit in U.S. Pat. No. 3,909,594 includes first and second peak detectors, the first peak detector following the positive excursions of the input signal and the second peak detector following the negative excursions of the input signal. The outputs of the first and second peak detectors are fed to a resistive summing network to generate the variable reference voltage. The output of the first peak detector is generally at the level of successive positive peaks, and the output of the second peak detector is generally at the level of successive negative peaks. Intermediate the successive positive and successive negative peaks, the respective outputs of the first and second peak detectors are discharged through appropriate resistors. In practice, it has been found that the discharge time of each peak detector had to be short enough so that the peak detector could respond to closely-following, relatively low amplitude peaks, and had to be long enough so that the peak detector had not completely discharged by the time voltage level of the input signal went above or below that of the reference signal following any peak. By establishing certain constraints on the scanning speed of the coded record and on the code density of the coded record, the circuit in U.S. Pat. No. 3,909,594 will provide acceptable operation without significant code reading errors. However, if these constraints are violated (such as the case where the reader is scanned very quickly or very slowly across the record), code reading errors will result.
It is therefore an object of this invention to provide an improved wave shaping circuit for electro-optical code readers.
It is another object of this invention to provide such an improved wave shaping circuit which is relatively insensitive to amplitude variations in an electrical output signal from the reader.
It is yet another object of this invention to provide such an improved wave shaping circuit which is relatively insensitive to the speed at which the reader is scanned across a coded record.